<!--{eval $_TPL['titles'] = array($blog['subject'], '日志');}-->
<!--{template header}-->

<div class="c_header a_header">
	<a href="space.php?uid=$space[uid]"><img src="<!--{avatar($space[uid],small)}-->" alt="$space[username]" class="avatar" /></a>
	<h1>日志</h1>
	<a href="space.php?uid=$space[uid]" class="spacelink"><!--{if $space[self]}-->我<!--{else}-->$space[username]<!--{/if}-->的空间</a>
</div>

<script>
	function closeSide() {
		if ($('div_main').className == 'side_right') {
			$('div_main').className = 'side_right side_right_close';
			$('a_showSide').innerHTML = '&laquo; 打开侧边栏';
			$('a_showSide').className = 'openside';
		} else {
			$('div_main').className = 'side_right';
			$('a_showSide').innerHTML = '&raquo; 关闭侧边栏';
			$('a_showSide').className = '';
		}
		$('a_showSide').blur();
	}
	function show_trace(id) {
		ajaxget('do.php?ac=ajax&op=trace&blogid='+$id, 'trace_ul');
		return false;
	}
	function show_trace_all() {
		ajaxget('do.php?ac=ajax&op=traceall&blogid='+$id+'&ajaxdiv=trace_div', 'trace_div');
		return false;
	}
</script>

<div class="h_status">
	<a href="javascript:;" onclick="closeSide();" id="a_showSide">&raquo; 关闭侧边栏</a>
	查看日志<span class="pipe">|</span><a href="space.php?uid=$space[uid]&do=$do&view=me">返回日志列表</a>
</div>

<div class="side_right" id="div_main">
	<div class="wide" id="div_main_content">

		<div class="title">
			<h1>$blog[subject]</h1>
			<!--{if $blog['friend']}-->
				<span class="r_option locked gray">
				<!--{if $blog['friend'] == 1}-->仅好友可见<!--{/if}-->
				<!--{if $blog['friend'] == 2}-->指定好友可见<!--{/if}-->
				<!--{if $blog['friend'] == 3}-->仅自己可见<!--{/if}-->
				<!--{if $blog['friend'] == 4}-->凭密码可见<!--{/if}-->
				</span>
			<!--{/if}-->
			<!--{date('Y-m-d H:i',$blog[dateline],1)}-->
		</div>
		<div id="blog_article" class="article"><table cellspacing="0" cellpadding="0"><tr><td class="l_text">$blog[message]</td></tr></table></div>

		<!--{if $blog[tag]}-->
		<div class="tags">
			<a href="space.php?uid=$blog[uid]&do=tag">标签</a>:&nbsp;
			<!--{loop $blog[tag] $tagid $tagname}-->
			<a href="space.php?uid=$blog[uid]&do=tag&id=$tagid">$tagname</a>&nbsp;
			<!--{/loop}-->
		</div>
		<!--{/if}-->
		<div class="status">
			<div class="r_option">
				<!--{if $_SGLOBAL[supe_uid] == $blog[uid]}-->
				<a href="cp.php?ac=blog&blogid=$blog[blogid]&op=edit">编辑</a><span class="pipe">|</span>
				<a href="cp.php?ac=blog&blogid=$blog[blogid]&op=delete" id="blog_delete_$blog[blogid]" onclick="ajaxmenu(event, this.id, 99999)">删除</a>
				<!--{/if}-->
			</div>

			<!--{if $blog[viewnum]}-->$blog[viewnum] 次阅读 | <!--{/if}-->
			<span id="comment_replynum">$blog[replynum]</span> 个评论
		</div>
		
		<!--{if $tracelist || (empty($tracelist) && !$space[self])}-->
		<div class="trace" style="padding-bottom: 10px;">
			<div class="title">
				<!--{if $blog[tracenum]}--><a href="javascript:;" onclick="show_trace_all();" class="r_option">全部($blog[tracenum])</a><!--{/if}-->
				<h2>留下脚印</h2>
			</div>
			<div id="trace_div">
			<ul class="avatar_list" id="trace_ul">
			<!--{if $tracelist}-->
				<!--{loop $tracelist $value}-->
				<li>
					<a href="space.php?uid=$value[uid]" title="$value[username]" target="_blank"><img src="<!--{avatar($value[uid],small)}-->" alt="$value[username]" class="avatar" /></a>
					<p><a href="space.php?uid=$value[uid]" title="$value[username]" target="_blank">$value[username]</a></p>
				</li>
				<!--{/loop}-->
				<!--{if !$space[self]}-->
				<li style="padding-top: 16px;"><a href="cp.php?ac=blog&blogid=$blog[blogid]&op=trace" id="trace_$blog[blogid]" onclick="ajaxmenu(event, this.id, 2000, 'show_trace')" class="tracebutton">踩一脚</a></li>
				<!--{/if}-->
			<!--{else}-->
				<li><a href="cp.php?ac=blog&blogid=$blog[blogid]&op=trace" id="trace_$blog[blogid]" onclick="ajaxmenu(event, this.id, 2000, 'show_trace')" class="tracebutton">踩一脚</a></li>
				<li style="line-height: 28px;"> 您的头像会显示在这里</li>
			<!--{/if}-->
			</ul>
			</div>
		</div>
		<!--{/if}-->
	
		<div class="post_list a_list" id="comment">
			<div class="status" style="padding: 0; height: 1px; overflow: hidden;">&nbsp;</div>
			<!--{if $cid}-->
			<div class="notice">
				当前只显示与你操作相关的单个评论，<a href="space.php?uid=$blog[uid]&do=blog&id=$blog[blogid]">点击此处查看全部评论</a>
			</div>
			<!--{/if}-->

			<ul id="comment_ul">
			<!--{loop $list $value}-->
				<!--{template space_comment_li}-->
			<!--{/loop}-->
			</ul>
		</div>
		<div class="page">$multi[html]</div>
		
		<!--{if !$blog[noreply]}-->
		<form id="commentform" name="commentform" action="cp.php?ac=comment" method="post" class="quickpost">
			
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td><textarea id="comment_message" onkeydown="ctrlEnter(event, 'commentsubmit_btn');" name="message" rows="5"></textarea></td>
				</tr>
				<tr>
					<td>
						<input type="hidden" name="refer" value="space.php?uid=$blog[uid]&do=$do&id=$id" />
						<input type="hidden" name="id" value="$id">
						<input type="hidden" name="idtype" value="blogid">
						<input type="hidden" name="commentsubmit" value="true" />
						<input type="button" id="commentsubmit_btn" name="commentsubmit_btn" class="submit" value="评论" onclick="ajaxpost('commentform', 'comment_status', 'comment_add')" />
						<span id="comment_status"></span>
					</td>
				</tr>
			</table>
		</form>
		<br />
		<!--{/if}-->
	</div>
	
	<div class="narrow" id="div_side">
			
		<!--{if $blog['related']}-->
		<div class="related">
			<!--{loop $blog['related'] $appid $values}-->
			<h2><!--{if $_SGLOBAL[app][$appid][name]}-->{$_SGLOBAL[app][$appid][name]}<!--{else}-->相关阅读<!--{/if}--></h2>
			<table cellspacing="2" cellpadding="2">
				<!--{loop $values['data'] $value}-->
				<tr>
					<!--{if $value[uid]}--><td class="avatar"><a href="space.php?uid=$value[uid]" title="$value[username]"><img src="<!--{avatar($value[uid],small)}-->" alt="$value[username]" /></a></td><!--{/if}-->
					<td>$value[html]</td>
				</tr>
				<!--{/loop}-->
			</table>
			<!--{/loop}-->
		</div>
		<!--{/if}-->
		
		<!--{ad/rightside}--><!-- 右侧栏广告-->
	</div>
<!--{if empty($blog[friend])}-->
</div>
<div class="f_status f_status_w s_clear">
	<a href="javascript:;" onclick="window.scrollTo(0,0);" id="a_top" title="TOP">TOP</a>
	<a href="cp.php?ac=share&type=blog&id=$blog[blogid]" id="a_share" onclick="ajaxmenu(event, this.id, 99999,'' , -1)">分享</a>
<!--{/if}-->
</div>

<script type="text/javascript">
	resizeImg('blog_article','400');
</script>
		
<!--{template footer}-->